﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Retete.Models;
using System.Globalization;

namespace Retete.ViewModels
{
    public class InventarViewModel
    {
        public List<StocViewModel> Stoc { get; set; }
        public List<string> Categorii { get; set; }
        public string ProdusNouCod { get; set; }
        public string ProdusNouNume { get; set; }
        public string ProdusNouCategorie { get; set; }
        public string ProdusNouUnitate { get; set; }
        public decimal ProdusNouCantitate { get; set; }
        public decimal ProdusNouPret { get; set; }
        public decimal ProdusNouPretVanzare { get; set; }

        public bool FocusProdusNou { get; set; }
        public bool Filtrare { get; set; }

        public int IDProdusSters { get; set; }
        public string CodUltimulProdus { get; set; }
        public string FiltruCategorie { get; set; }
        public DateTime SelectedDate { get; set; }
        public string Titlu
        {
            get
            {
                if (SelectedDate.Date == DateTime.Today) return "Stoc curent teoretic";
                else return "Stoc la data " + SelectedDate.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
        }

        public InventarViewModel(List<StocViewModel> setStoc)
        {
            Stoc = setStoc;
            IDProdusSters = -1;
        }
        public InventarViewModel() { }
    }
}